Performance Tuning on the PVA

From RidgeRun Developer Wiki


Follow Us On Twitter LinkedIn Email Share this page



NVIDIA partner logo






Clock Frequency Tuning

Even if it is not possible to use the Jetson board on the maximum power modes due to energy or thermal restrictions, it is possible to modify the PVA's clock frequency without increasing the overall power consumption of the board by a big amount.

There are two clock frequency values that can be tuned. The first one corresponds to the VPS clock frequency, which is the VPU Subsystem frequency. Then, it is also possible to modify the 256 bit AXI frequency which affects the VPU's instruction cache.

In order to modify these clock frequency values for an specific power mode it is necessary to the nvpmodel configuration file. This file defines the available power modes for the board and it specifies the clock frequencies and other hardware configurations, for example how many CPU cores are used. As an example, the default configuration for the Orin AGX's 50 W mode is shown:

< POWER_MODEL ID=3 NAME=MODE_50W >
CPU_ONLINE CORE_0 1
CPU_ONLINE CORE_1 1
CPU_ONLINE CORE_2 1
CPU_ONLINE CORE_3 1
CPU_ONLINE CORE_4 1
CPU_ONLINE CORE_5 1
CPU_ONLINE CORE_6 1
CPU_ONLINE CORE_7 1
CPU_ONLINE CORE_8 1
CPU_ONLINE CORE_9 1
CPU_ONLINE CORE_10 1
CPU_ONLINE CORE_11 1
TPC_POWER_GATING TPC_PG_MASK 0
GPU_POWER_CONTROL_ENABLE GPU_PWR_CNTL_EN on
CPU_A78_0 MIN_FREQ 729600
CPU_A78_0 MAX_FREQ 1497600
CPU_A78_1 MIN_FREQ 729600
CPU_A78_1 MAX_FREQ 1497600
CPU_A78_2 MIN_FREQ 729600
CPU_A78_2 MAX_FREQ 1497600
GPU MIN_FREQ 0
GPU MAX_FREQ 816000000
GPU_POWER_CONTROL_DISABLE GPU_PWR_CNTL_DIS auto
EMC MAX_FREQ -1
DLA0_CORE MAX_FREQ 1369600000
DLA1_CORE MAX_FREQ 1369600000
DLA0_FALCON MAX_FREQ 729600000
DLA1_FALCON MAX_FREQ 729600000
PVA0_VPS MAX_FREQ 704000000
PVA0_AXI MAX_FREQ 486400000

In order to tune the PVA's frequency it is necessary to modify the PVA0_VPS MAX_FREQ and PVA0_AXI MAX_FREQ fields for the desired power mode and set the values for the desired clock frequency. The configuration file can be modified using a text editor, for example if using Nano:

sudo nano /etc/nvpmodel.conf

Set the clock to be used in the desired power mode and then save the file. After applying the change use the nvpmodel command to change to the desired power mode. For example, to change to the 30 W mode in an Orin AGX:

sudo nvpmodel -m 2

The -m option indicates the power mode to which the board will change, and the number must match the IDs defined in the configuration file. For example, to change to the 50 W mode use number 3 for the -m option. After executing the command, it is necessary to reboot the board:

sudo nvpmodel -m 2 #Example output:

NVPM WARN: Golden image context is already created
NVPM WARN: Reboot required for changing to this power mode: 2
NVPM WARN: DO YOU WANT TO REBOOT NOW? enter YES/yes to confirm:
yes
NVPM WARN: rebooting..

After the board completes the rebooting process, the current power mode can be verified with the following command:

nvpmodel -q #Example output:

NV Power Mode: MODE_30W
2

Regarding the tuning values, the maximum clock frequency values that can be set are shown in the following table:

PVA maximum clock frequency
Value Orin AGX Orin NX
PVA0_VPS MAX_FREQ 1 369.6 MHz 1190.4 MHz
PVA0_AXI MAX_FREQ 985.6 MHz MHz